package io;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class OISDemo {
    public static void main(String[] args)throws Exception{
        //对象的反序列化  将一组字节还原为java对象

    FileInputStream fis =new FileInputStream("Student.obj");
    ObjectInputStream ois=new ObjectInputStream(fis);
    Object obj=ois.readObject();//反序列化
    Student zs=(Student) obj;
    System.out.println(zs);
    ois.close();


    }
}
